<div id="fleetctl-preview" v-cloak>
  <div purpose="announcement-banner">
    <animated-arrow-button arrow-color="white" text-color="white" href="/articles/free-migration-from-jamf-to-fleet">Free Jamf to Fleet MDM migration service</animated-arrow-button>
  </div>
  <div purpose="page-container" class="d-flex flex-column container">
    <div purpose="page-title">
      <h1>Try Fleet</h1>
      <p>The quickest way to try Fleet Premium is to run a local demo with <a href="https://docs.docker.com/get-docker/" target="_blank">Docker</a>.</p>
      <p class="mb-0">Follow the instructions below to test Fleet on your macOS, Windows, and Linux device.</p>
    </div>
    <div purpose="prerequisites">
      <h2>Prerequisites</h2>
      <p>An installation of Docker is required to try Fleet locally.</p>
      <a purpose="docker-button" href="https://docs.docker.com/get-docker/" target="_blank"
        style="color: #fff; background: #0073EC;" class="d-flex btn btn-md justify-content-center align-items-center mt-3 mt-sm-0">
        <img alt="Docker logo" src="/images/logo-docker-51x36@2x.png"/>
        Get Docker
      </a>
    </div>
    <div purpose="installation-steps">
      <h2>Install Fleet</h2>
      <div purpose="platform-selector" class="d-flex flex-row justify-content-between justify-content-sm-start">
        <div purpose="selector-tab" :class="[selectedPlatform === 'macos' ? 'selected' : '']" @click="selectedPlatform = 'macos'"><p>macOS</p></div>
        <div purpose="selector-tab" :class="[selectedPlatform === 'windows' ? 'selected' : '']" @click="selectedPlatform = 'windows'"><p>Windows</p></div>
        <div purpose="selector-tab" :class="[selectedPlatform === 'linux' ? 'selected' : '']" @click="selectedPlatform = 'linux'"><p>Linux</p></div>
        <div purpose="selector-tab" :class="[selectedPlatform === 'npm' ? 'selected' : '']" @click="selectedPlatform = 'npm'"><p>NPM</p></div>
      </div>
      <%/* macOS install steps */%>
      <div v-if="selectedPlatform === 'macos'">
        <div purpose="numbered-steps">
          <div purpose="step">
              <p>Install the <code>fleetctl</code> command line tool:</p>
              <div purpose="terminal-commands">
                <div purpose="command-container">
                  <code>{{installCommands[selectedPlatform]}}</code>
                </div>
                <span purpose="install-copy-button" @click="clickCopyInstallCommand(selectedPlatform)"></span>
              </div>
          </div>
          <div purpose="step">
            <p>Run a local demo of the Fleet server:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code v-if="userHasTrialLicense && !userHasExpiredTrialLicense">{{fleetctlPreviewTerminalCommand[selectedPlatform]}} --license-key {{trialLicenseKey}}</code>
                <code v-else>{{fleetctlPreviewTerminalCommand[selectedPlatform]}}</code>
              </div>
              <a purpose="command-copy-button" @click="clickCopyTerminalCommand(selectedPlatform)"></a>
            </div>
            <blockquote purpose="tip" v-if="!userHasTrialLicense && !me">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>To demo Fleet Premium features, <a href="/login">log in</a> or <a href="/register">create an account</a> to get your trial license key.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>Your Fleet Premium trial license has expired. You can still run the free version of Fleet locally.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasTrialLicense && !userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>This license key is valid for 30 days.</p>
              </div>
            </blockquote>
          </div>
          <div purpose="step">
            <p>The Fleet UI is now available at <a href="http://localhost:1337" target="_blank">http://localhost:1337</a>. Use the credentials below to login:</p>
            <p class="mb-2"><strong>Email</strong>: admin@example.com</p>
            <p class="mb-0"><strong>Password</strong>: preview1337#</p>
          </div>
        </div>
      </div>
      <%/* Linux install steps */%>
      <div v-else-if="selectedPlatform === 'linux'">
        <div purpose="numbered-steps">
          <div purpose="step">
            <p>Install the <code>fleetctl</code> command line tool:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code>{{installCommands[selectedPlatform]}}</code>
              </div>
              <span purpose="install-copy-button" @click="clickCopyInstallCommand(selectedPlatform)"></span>
            </div>
          </div>
          <div purpose="step">
            <p>Run a local demo of the Fleet server:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code v-if="userHasTrialLicense && !userHasExpiredTrialLicense">{{fleetctlPreviewTerminalCommand[selectedPlatform]}} --license-key {{trialLicenseKey}}</code>
                <code v-else>{{fleetctlPreviewTerminalCommand[selectedPlatform]}}</code>
              </div>
              <a purpose="copy-button" @click="clickCopyTerminalCommand(selectedPlatform)"></a>
            </div>
            <blockquote purpose="tip" v-if="!userHasTrialLicense && !me">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>To demo Fleet Premium features, <a href="/login">log in</a> or <a href="/register">create an account</a> to get your trial license key.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>Your Fleet Premium trial license has expired. You can still run the free version of Fleet locally.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasTrialLicense && !userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>This license key is valid for 30 days.</p>
              </div>
            </blockquote>
          </div>
          <div purpose="step">
            <p>The Fleet UI is now available at <a href="http://localhost:1337" target="_blank">http://localhost:1337</a>. Use the credentials below to login:</p>
            <p class="mb-2"><strong>Email</strong>: admin@example.com</p>
            <p class="mb-0"><strong>Password</strong>: preview1337#</p>
          </div>
        </div>
      </div>
      <%/* Windows install steps */%>
      <div v-else-if="selectedPlatform === 'windows'">
        <div purpose="numbered-steps">
          <div purpose="step">
              <p>Install the <code>fleetctl</code> command line tool:</p>
              <div purpose="terminal-commands">
                <div purpose="command-container">
                  <code>{{installCommands[selectedPlatform]}}</code>
                </div>
                <span purpose="install-copy-button" @click="clickCopyInstallCommand(selectedPlatform)"></span>
              </div>
          </div>
          <div purpose="step">
            <p>Run a local demo of the Fleet server:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code v-if="userHasTrialLicense && !userHasExpiredTrialLicense">{{fleetctlPreviewTerminalCommand[selectedPlatform]}} --license-key {{trialLicenseKey}}</code>
                <code v-else>{{fleetctlPreviewTerminalCommand[selectedPlatform]}}</code>
              </div>
              <a purpose="command-copy-button" @click="clickCopyTerminalCommand(selectedPlatform)"></a>
            </div>
            <blockquote purpose="tip" v-if="!userHasTrialLicense && !me">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>To demo Fleet Premium features, <a href="/login">log in</a> or <a href="/register">create an account</a> to get your trial license key.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>Your Fleet Premium trial license has expired. You can still run the free version of Fleet locally.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasTrialLicense && !userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>This license key is valid for 30 days.</p>
              </div>
            </blockquote>
          </div>
          <div purpose="step">
            <p>The Fleet UI is now available at <a href="http://localhost:1337" target="_blank">http://localhost:1337</a>. Use the credentials below to login:</p>
            <p class="mb-2"><strong>Email</strong>: admin@example.com</p>
            <p class="mb-0"><strong>Password</strong>: preview1337#</p>
          </div>
        </div>
      </div>
      <%/* NPM install steps */%>
      <div v-else-if="selectedPlatform === 'npm'">
        <div purpose="numbered-steps">
          <div purpose="step">
            <p>Install Node.js</p>
            <a purpose="node-button" href="https://nodejs.org/en/download/" target="_blank" style="color: #fff; background: #333;" class="btn d-flex flex-row align-items-center justify-content-center">
              <img alt="NodeJS logo" src="/images/logo-node-59x36@2x.png"/>
              Find my Node installer
            </a>
          </div>
          <div purpose="step">
            <p>Install the <code>fleetctl</code> command line tool:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code>{{installCommands[selectedPlatform]}}</code>
              </div>
              <span purpose="install-copy-button" @click="clickCopyInstallCommand(selectedPlatform)"></span>
            </div>
          </div>
          <div purpose="step">
            <p>Run a local demo of the Fleet server:</p>
            <div purpose="terminal-commands">
              <div purpose="command-container">
                <code v-if="userHasTrialLicense && !userHasExpiredTrialLicense">{{fleetctlPreviewTerminalCommand[selectedPlatform]}} --license-key {{trialLicenseKey}}</code>
                <code v-else>{{fleetctlPreviewTerminalCommand[selectedPlatform]}}</code>
              </div>
              <a purpose="command-copy-button" @click="clickCopyTerminalCommand(selectedPlatform)"></a>
            </div>
            <blockquote purpose="tip" v-if="!userHasTrialLicense && !me">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>To demo Fleet Premium features, <a href="/login">log in</a> or <a href="/register">create an account</a> to get your trial license key.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>Your Fleet Premium trial license has expired. You can still run the free version of Fleet locally.</p>
              </div>
            </blockquote>
            <blockquote purpose="tip" v-if="userHasTrialLicense && !userHasExpiredTrialLicense">
              <img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
              <div class="d-block">
                <p>This license key is valid for 30 days.</p>
              </div>
            </blockquote>
          </div>
          <div purpose="step">
            <p>The Fleet UI is now available at <a href="http://localhost:1337" target="_blank">http://localhost:1337</a>. Use the credentials below to login:</p>
            <p class="mb-2"><strong>Email</strong>: admin@example.com</p>
            <p class="mb-0"><strong>Password</strong>: preview1337#</p>
          </div>
        </div>
      </div>
    </div>
  </div>
  <parallax-city></parallax-city>
  <signup-modal></signup-modal>
</div>
<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>
